package com.android.panballgame;

import android.content.Context;
import android.opengl.GLSurfaceView;
import android.util.AttributeSet;

public class PBGameView extends GLSurfaceView{
		// Renderer의 참조 변수
		PBGameRenderer renderer;
		PBGameRenderer2 renderer2;
		PBGameRenderer3 renderer3;
		
		public PBGameView(Context context, AttributeSet attrs) {
			super(context, attrs);
			// Renderer 객체를 생성한다.
			if(PBEngine.level == 1){
				renderer = new PBGameRenderer(context);
			    setRenderer(renderer);
			}
			else if(PBEngine.level == 2){
				renderer2 = new PBGameRenderer2(context);
				setRenderer(renderer2);			
			}
			else if(PBEngine.level == 3){
				renderer3 = new PBGameRenderer3(context);
				setRenderer(renderer3);			
			}
		}
}



